package com.yunyi.dm.singleton;

/**
 * 懒汉式
 * 内部类加载模式
 *
 * @author yunyi
 */
public class LazyMode04 {

    public static LazyMode04 getInstance() {
        return LazyModeHolder.INSTANCE;
    }

    private static class LazyModeHolder {
        private static final LazyMode04 INSTANCE = new LazyMode04();
    }

    public Object readResolve() {
        return LazyModeHolder.INSTANCE;
    }

    private LazyMode04() {
    }
}
